package com.yunatt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yunatt.model.MachineCommandEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface MachineCommandMapper extends BaseMapper<MachineCommandEntity> {
    int deleteByPrimaryKey(Integer id);

    int insertSelective(MachineCommandEntity record);

    MachineCommandEntity selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MachineCommandEntity record);

    int updateByPrimaryKey(MachineCommandEntity record);

    List<MachineCommandEntity> findPendingCommand(@Param("sendStatus")int sendStatus, @Param("serial")String serial);

    int updateCommandStatus(@Param("status")int status, @Param("sendStatus")int sendStatus, @Param("runTime") Date runTime, @Param("id")int id);

}